using JoJoC_AOP.Models;
using JoJoC_AOP.Services;
using Microsoft.AspNetCore.Mvc;

namespace JoJoC_AOP.Controllers
{
    [ApiController]
    [Route("[controller]")]
    public class ProductController : ControllerBase
    {
        private readonly IProductService ProductService;

        public ProductController(IProductService _ProductService) 
        {
            ProductService = _ProductService;
        }

        [HttpGet(Name = "GetProduct")]
        public List<Product> GetProduct()
        {
            return ProductService.GetProduct();
        }
    }
}
